import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;

public class Scripting {

	public static void main(String[] args) {
		try {
			// create a ScriptEngineManager
			ScriptEngineManager m = new ScriptEngineManager();
			// get an instance of JavaScript script engine
			ScriptEngine engine = m.getEngineByName("JavaScript");
			// evaluate a script
			//engine.eval("alert(\"Hello World!\")");
			engine.eval("print('Hello, Scripting')");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
